package cn.hackcloud.concurrency.observable;

/**
 * 生命周期接口的空实现
 *
 * @param <T>
 */
public class EmptyLifeCycle<T> implements TaskLifeCycle<T> {
    @Override
    public void onStart(Thread thread) {
        System.out.println("onStart");
    }

    @Override
    public void onRunning(Thread thread) {
        System.out.println("onRunning");
    }

    @Override
    public void onFinish(Thread thread, T result) {
        System.out.println("onFinish result:" + result);
    }

    @Override
    public void onError(Thread thread, Exception e) {
        System.out.println("onError:" + e.getLocalizedMessage());
    }
}
